AltiVec Emulator

The AltiVec Emulator emulates the instructions described in the AltiVec Technology Programming Environments Manual available from Motorola. It also contains changes to Mac OS to support the additional register state found in AltiVec processors.

This release is very preliminary and as such it is strongly advised that only developers experimenting with AltiVec install it. It offers no discernable value to end users. If you are developing code using this emulator, it is strongly advised that you not release that code in an end-user product until you have had the opportunity to fully test your code on real hardware that supports AltiVec.

This release supports System 8.1 or System 8.5 only.

Testing for Availability of AltiVec

Call Gestalt with the gestaltPowerPCProcessorFeatures selector and check the gestaltPowerPCHasVectorInstructions bit if you intend to use any instructions that operate on vectors and the gestaltPowerPCHasDataStreams bit if you intend to use data streams.

AltiVec Debug Modes

The AVDebug dcmd should be placed in the MacsBug Preferences folder. This dcmd can be used to enable two debugging features added to this release of the AltiVec Emulator.

MEM mode

For all vector load and store instructions that specify a vector register not enabled via the VRSave special-purpose register, this mode fills the register with 0x7FFFDEAD7FFFDEAD7FFFDEAD7FFFDEAD. This will help identify improper uses of VRSave which would be difficult to debug otherwise.

VRSAVE mode

All non-load/store vector instructions that specify a vector register not enabled via the VRSave special-purpose register are treated as illegal instructions.

Known bugs in this release

Data Storage Interrupts

Any vector load or store instruction that casues a DSI may crash. Do not use with Virtual Memory enabled. Do not execute vector loads or stores to illegal addresses.

Limitations in this release

Data Streams

No prefetching occurs in response to the data stream instructions.

Thread Manager

AltiVec instructions currently may not be used from more than one thread per process. Any custom ThreadSwitchProcPtr you may be using will need to be updated to properly switch the additional context.

Macintosh Runtime for Java

AltiVec instructions may not be used from within JManager, JNI, or JDirect callbacks at this time.

AltiVec is a trademark of Motorola, Inc., registered in the United States and other countries.